#include <gwbase/base/daemon.h>
#include <gwbase/base/logging.h>

#include <boost/bind.hpp>

using namespace dicom;

int service(void* arg) {
  dicom::SetRollingFileLogging(".", "daemon");

  for (;;) {
    LOG_INFO << "Message";
    ::sleep(1);
  }

  return 0;
}

int main(int argc, char** argv) {
  // return service(argc, argv);
  Daemon daemon(service);
  return daemon.Run(NULL);
}
